﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Core.Services;
using MvcEngine.Blog.Helper;
using MvcEngine.Blog.Models.Entities;
using MvcEngine.Blog.Managers;
using MvcEngine.Core;

namespace MvcEngine.Blog.Components.Services
{
    public class BlogEmailService : IEmailService
    {
        #region IEmailService Members

        public EmailSettings GetSettings()
        {
            BlogData blog = BlogManager.Current.GetCurrentBlog();

            EmailSettings settings = new EmailSettings();
            settings.Host = blog.SmtpServer;
            settings.Port = blog.SmtpServerPort;
            settings.UserName = blog.SmtpUserName;
            settings.Password = blog.SmtpPassword;
            settings.Email = blog.Email;
            return settings;
        }

        #endregion
    }
}
